Optimal. Leaf size=47 \[ \frac {10 \tan ^{-1}\left (\frac {\sin (c+d x)}{-\cos (c+d x)+\sqrt {3}+2}\right )}{\sqrt {3} d}+\frac {5 x}{\sqrt {3}}-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2735, 2657} \[ \frac {10 \tan ^{-1}\left (\frac {\sin (c+d x)}{-\cos (c+d x)+\sqrt {3}+2}\right )}{\sqrt {3} d}+\frac {5 x}{\sqrt {3}}-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2657
Rule 2735
Rubi steps
\begin {align*} \int \frac {3+\cos (c+d x)}{2-\cos (c+d x)} \, dx &=-x+5 \int \frac {1}{2-\cos (c+d x)} \, dx\\ &=-x+\frac {5 x}{\sqrt {3}}+\frac {10 \tan ^{-1}\left (\frac {\sin (c+d x)}{2+\sqrt {3}-\cos (c+d x)}\right )}{\sqrt {3} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 31, normalized size = 0.66 \[ \frac {10 \tan ^{-1}\left (\sqrt {3} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {3} d}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.88, size = 43, normalized size = 0.91 \[ -\frac {3 \, d x + 5 \, \sqrt {3} \arctan \left (\frac {2 \, \sqrt {3} \cos \left (d x + c\right ) - \sqrt {3}}{3 \, \sin \left (d x + c\right )}\right )}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 72, normalized size = 1.53 \[ -\frac {3 \, d x - 5 \, \sqrt {3} {\left (d x + c + 2 \, \arctan \left (-\frac {\sqrt {3} \sin \left (d x + c\right ) - 3 \, \sin \left (d x + c\right )}{\sqrt {3} \cos \left (d x + c\right ) + \sqrt {3} - 3 \, \cos \left (d x + c\right ) + 3}\right )\right )} + 3 \, c}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 39, normalized size = 0.83 \[ \frac {10 \sqrt {3}\, \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {3}\right )}{3 d}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 52, normalized size = 1.11 \[ \frac {2 \, {\left (5 \, \sqrt {3} \arctan \left (\frac {\sqrt {3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right ) - 3 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )\right )}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.67, size = 74, normalized size = 1.57 \[ \frac {\left (\frac {\pi -\frac {5\,\pi \,\sqrt {3}}{3}}{d}-\frac {\pi +\frac {5\,\pi \,\sqrt {3}}{3}}{d}\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )}{\pi }-\frac {d\,x-\frac {10\,\sqrt {3}\,\mathrm {atan}\left (\sqrt {3}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.42, size = 56, normalized size = 1.19 \[ \begin {cases} - x + \frac {10 \sqrt {3} \left (\operatorname {atan}{\left (\sqrt {3} \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} \right )} + \pi \left \lfloor {\frac {\frac {c}{2} + \frac {d x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{3 d} & \text {for}\: d \neq 0 \\\frac {x \left (\cos {\relax (c )} + 3\right )}{2 - \cos {\relax (c )}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________